一个form中同时有<input type="file">和<input type="text">,jsp页面中同时得到这两个值
来源:百度知道 编辑:UC知道 时间:2024/09/25 17:19:43
当点击提交后 同时获得表单中txt"表格"的值和file"浏览"的值
分别给他们一个定一个一个属性如:
<input type="file" id="file">
<input type="text" id="text">
就这样了 这样就可以分开了,JSP中对应页面的.do就会进行处理了。大概如这样:String file = (String)thisForm.getFile();
String text = (String)thisForm.gettext(); 当然其中的get方法和thisForm还是要根据你的页面有所不同的。
<input type="file" id="file1">
<input type="text" id="text1">
String strFile=request.getParameter("file1");
String strTxt=request.getParameter("text1");
Parameter可能拼写不对,看下Myeclipse的自动的代码补全
先判断是不是文件上传,做不同处理
那要看你用什么框架或者什么包了。具体没什么好说的
<input type="file">记得+ID+NAME 随便起个,要上传上来认不到
最好分开,文件上传单独一个form
vb中,如何判断一个form是否有菜单?
Response.Write Request.Form("hobby")(i) & "< BR>" 这里有无效字符么?
在ASP中如何在<form> <form> 中的action去掉,例如:
一个页面中有两个不同的表单,!用两个form还是一个?
我想知道在C#中如何在关闭1个FORM的同时打开另1个FORM
关于<form>
在ppt运用一个VB程序(),怎么操作幻灯片才具有vb中form的代码功能
★☆☆ JS中 document.form.input[i].value=""; 不合法? 在线等!
form 中 target 的四个值有什么意义?
请问表单中form和document.getElementByid有什么区别?